Memory devices including semiconductor elements are broadly classified into two categories: a volatile memory device that loses stored data when not powered, and a nonvolatile memory device that holds stored data even when not powered.
A typical example of a volatile memory device is a dynamic random access memory (DRAM). A DRAM stores data in such a manner that a transistor included in a memory element is selected and charge is accumulated in a capacitor.
When data is read from a DRAM, charge in a capacitor is lost owing to the above principle; thus, writing is necessary every time data is read out. Moreover, since leakage current (off-state current) flows between a source and a drain of a transistor included in a memory element when the transistor is in an off state, charge flows into or out even when the transistor is not selected, which makes a data holding period short. For that reason, write operation (refresh operation) is necessary at predetermined intervals, and it is difficult to sufficiently reduce power consumption. Furthermore, since stored data is lost when power supply is stopped, another memory device using a magnetic material or an optical material is needed in order to hold data for a long time.
Another example of a volatile memory device is a static random access memory (SRAM). An SRAM holds stored data by using a circuit such as a flip-flop and thus does not need refresh operation, which is an advantage over a DRAM. However, cost per storage capacity is increased because a circuit such as a flip-flop is used. Moreover, as in a DRAM, stored data in an SRAM is lost when power supply is stopped.
A typical example of a non-volatile memory device is a flash memory. A flash memory includes a floating gate between a gate electrode and a channel formation region in a transistor and stores data by holding charge in the floating gate. Therefore, a flash memory has advantages that the data holding period is extremely long (semi-permanent) and refresh operation which is necessary in a volatile memory device is not needed (e.g., see Patent Document 1).
However, in a flash memory, there is a problem in that a memory element becomes unable to function after a predetermined number of writing because a gate insulating layer included in the memory element deteriorates due to tunneling current generated in writing. In order to reduce effects of this problem, a method in which the number of writing is equalized among the memory elements can be employed, for example, but a complicated peripheral circuit is needed to employ this method. Moreover, even when such a method is employed, the fundamental problem about the lifetime is not resolved. In other words, a flash memory is not suitable for applications in which data is frequently rewritten.
In addition, high voltage is needed for injecting charge in the floating gate or removing the charge, and a circuit therefor is required. Further, it takes a relatively long time to inject or remove charge, and it is not easy to increase the speed of writing and erasing data.